﻿@using Smartstore.Web.Models.Identity;

@model PasswordRecoveryConfirmModel

@{
    Assets.AppendTitleParts(T("PageTitle.PasswordRecovery"));
}

<div class="page password-recovery-page">
    <div class="page-title">
        <h1>@T("Account.PasswordRecovery")</h1>
    </div>

    <div class="page-body">
        <div sm-if="Model.Result.HasValue()" class="alert alert-success">
            @Model.Result
        </div>
        
        @if (!Model.SuccessfullyChanged)
        {
            <form asp-action="PasswordRecoveryConfirm" method="post" class="row">

                <input asp-for="Email" type="hidden" />
                <input asp-for="Token" type="hidden" />

                <div class="col-12 col-lg-9 col-xl-8">
                    <div class="form-group row">
                        <label asp-for="NewPassword" class="col-md-3 col-form-label required"></label>
                        <div class="col-md-9">
                            <input asp-for="NewPassword" sm-required="true" />
                            <span asp-validation-for="NewPassword"></span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label asp-for="ConfirmNewPassword" class="col-md-3 col-form-label required"></label>
                        <div class="col-md-9">
                            <input asp-for="ConfirmNewPassword" sm-required="true" />
                            <span asp-validation-for="ConfirmNewPassword"></span>
                        </div>
                    </div>
                    <div class="form-group row">
                        <div class="col">
                            <input type="submit" name="set-password" class="btn btn-danger btn-lg" value="@T("Account.PasswordRecovery.ChangePasswordButton")" />
                        </div>
                    </div>
                </div>
            </form>
        }
    </div>
</div>
